<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>数据操作时出错</title>
</head>
<body>
<div align="center" style="width:100%;height:600px;border:1px solid rgb(146,200,238);padding-top:30px">
    <p align="center">
        对不起，您的此次操作失败，请返回重试！如果仍有问题，请与管理员联系！
    </p>

    <s:if test="%{exceptionId != null}">
    <p align="center">
        错误信息编号：<font color="blue"><strong><s:property value="exceptionId"/></strong></font>
    </p>
    </s:if>

    <p align="center">
        <button type="button" class="button1" onclick="history.go(-1)">返 回</button>
    </p>

    <p>
        查看详情，请点击<a href="#" onclick="displayExceptions()">这里</a>。
    </p>

    <div id="exceptionDiv" style="text-align:left; padding-left:10px; padding-right:10px; display:none;">
        <s:property value="exception"/>
    </div>
    <br/>
    <div id="exceptionStackDiv" style="text-align:left; padding-left:10px; padding-right:10px; display:none;">
        <textarea rows="20" style="width:100%"><s:property value="exceptionStack"/></textarea>
    </div>

</div>
</body>
<script type="text/javascript">
    function displayExceptions() {
        document.getElementById("exceptionDiv").style.display = "block";
        document.getElementById("exceptionStackDiv").style.display = "block";
    }
    if (window.parent != window && window.name == "messageFrame") {
        var msg = "对不起，您的此次操作失败，请返回重试！如果仍有问题，请与管理员联系！";
    <s:if test="%{exceptionId != null}">
        msg = msg + "\r\n\r\n错误信息编号：<s:property value="exceptionId"/>";
    </s:if>
        alert(msg);
    }
</script>
</html>